<?php
header('Content-Type: text/html; charset=UTF-8');
require 'crawl.php';

$summary = '';
$url = 'http://ole.vn/';
$status = get_headers($url);

if ($status[0] == 'HTTP/1.1 404 Not Found'){
	die($status[0]);
} else {
	$html = file_get_html($url);

	if ($html->find('div#m-league-table135', 0)){
		foreach ($html->find('a') as $e){
			$e->href = '#';
		}

		$summary = $html->find('div#m-league-table135', 0)->innertext;
	}
}
?>
<html>
<head>
<title>Bang xep hang</title>
<style>
html, body {
	margin: 0;
	padding: 0;
	font-family: Verdana, Geneva, sans-serif;
	font-size: 12px;
	color: #111;
}
a {
	text-decoration: none;
}
.container {
	width: 300px;
	margin: 0;
	padding: 0;
}
.orange-title .uk-panel-title {
	background: #ff9000;
	padding: 3px 10px;
	color: #fff;
	font-size: 18px
}
.uk-panel-title {
	margin-top: 0;
	margin-bottom: 5px;
	font-size: 18px;
	line-height: 30px;
	font-weight: 700;
	text-transform: uppercase;
	color: #444
}
/* m-league-table
----------------------------------*/
.m-league-table {
	border: none !important;
}
.m-league-table .league-logo {
	width: 40px;
	height: 40px;
	border-radius: 20px
}
.m-league-table .tab-content {
	width: 100%;
	margin-top: 5px;
	font-size: 12px;
	font-family: Verdana, Geneva, sans-serif
}
.m-league-table .tab-content tbody tr:nth-of-type(odd) {
	background: #eee
}
.m-league-table .tab-content tbody tr th {
	color: #5b564b;
	padding: 5px;
	text-align: center;
	font-weight: normal
}
.m-league-table .tab-content tbody tr th.left {
	text-align: left
}
.m-league-table .tab-content tbody tr td {
	color: #232629;
	padding: 2px;
	text-align: center
}
.m-league-table .tab-content tbody tr td.left {
	text-align: left
}
.m-league-table .tab-content tbody tr td.right {
	text-align: right
}
.m-league-table .tab-content tbody .view-all td {
	background: #ebe6d8;
	border-top: 1px solid #d4ccb9
}
.m-league-list .tab-content .row {
	background: #e7e7e7;
	clear: both;
	padding: 10px 20px;
	margin-bottom: 5px
}
.m-league-list .tab-content .row .league-logo {
	float: left;
	width: 40px;
	height: 40px;
	border-radius: 20px;
	margin: 2px 20px 0 0
}
.m-league-list .tab-content .row h4 {
	margin: 0;
	line-height: 20px;
	font-weight: 700
}
.m-league-list .tab-content .row ul {
	margin: 0
}
.m-league-list .tab-content .row ul li {
	display: inline-block
}
.m-league-list .tab-content .row ul li a {
	color: #a5977a;
	font-family: "Roboto Condensed"
}
.m-league-result {
	border: none !important
}
.m-league-result .tab-content {
	font-weight: bold;
	width: 100%;
	margin-top: 5px
}
.m-league-result .tab-content tbody tr:nth-of-type(odd) {
	background: #f3f0e8
}
.m-league-result .tab-content tbody tr th {
	color: #5b564b;
	padding: 10px 5px;
	text-align: center
}
.m-league-result .tab-content tbody tr th.left {
	text-align: left
}
.m-league-result .tab-content tbody tr td {
	color: #232629;
	padding: 5px;
	text-align: center
}
.m-league-result .tab-content tbody tr td.left {
	text-align: left;
	width: 35%
}
.m-league-result .tab-content tbody tr td.right {
	text-align: right;
	width: 35%
}
.m-league-result .tab-content tbody tr td.result {
	background: #ededed;
	width: 15%
}
.m-league-result .tab-content tbody .view-all td {
	background: #ebe6d8;
	border-top: 1px solid #d4ccb9
}
.m-livescore .links {
	float: right;
	margin-top: -25px
}
.m-livescore .match {
	border: 1px solid #c6c3bb
}
.m-livescore .match .team-logo {
	max-height: 55px;
	max-width: 55px;
	border-radius: 27.5px
}
.m-livescore .match .round {
	font-weight: bold;
	color: #3e454c
}
.m-livescore .match .date-time {
	font-weight: bold;
	color: #ff9000
}
.m-livescore .match .first-row {
	width: 100%
}
.m-livescore .match .first-row .first-team {
	padding: 10px 0 10px 10px;
	text-align: left
}
.m-livescore .match .first-row .match-info {
	text-align: center;
	vertical-align: top
}
.m-livescore .match .first-row .second-team {
	padding: 10px 10px 10px 0;
	text-align: right
}
.m-livescore .match .second-row {
	width: 100%;
	background: #e7e7e7 url(../images/white-arrow.png) 50% -4px no-repeat;
	text-align: center;
	display: inline-block;
	padding: 15px 0 0 0
}
.m-livescore .match .second-row .team-name {
	text-transform: uppercase;
	/*font-size: 16px;*/
	font-weight: bold;
	color: #3e454c
}
.tm-headerbar {
	margin: 0
}
.tm-headerbar .tm-logo {
	margin: 7px 10px 0 0;
	float: left
}
.tm-headerbar .tm-logo-small {
	margin: 17px 10px 0 0;
	float: left
}
.tm-headerbar .socialbar {
	background: #585b5d;
	padding: 13px 6px;
	margin-left: 10px;
	float: right
}
.item-comment {
	background: #eee;
	padding: 10px;
	margin: 10px 0
}
.item-comment .item-comment-tabs {
	border: none;
	background: transparent
}
.item-comment .item-comment-tabs ul {
	float: left;
	width: 100%;
	border-bottom: 1px solid #ff9000
}
.item-comment .item-comment-tabs ul li {
	font-weight: 400;
	/*font-size: 16px;*/
	float: left
}
.item-comment .item-comment-tabs .comment-tab-name {
	color: #3e454c;
	font-weight: 700;
	padding: 5px 40px 5px 0;
	text-transform: uppercase
}
.item-comment .item-comment-tabs .comment-tab-title {
	background: #d0cdc2;
	color: #797463;
	padding: 5px 10px;
	margin-left: 5px;
	border-radius: 5px 5px 0 0
}
.item-comment .item-comment-tabs .tab-selected {
	background: #ff9000;
	color: #fff
}
.item-comment .item-comment-tabs .comment-tab-content {
	clear: both
}

/*jqxTabs*/
.jqx-tabs {
	outline: none;
	margin: 0 0 0 0;
	padding: 0px;
	overflow: hidden;
	background: transparent;
	border: 1px solid transparent;
}
/*applied to the tab close button.*/
.jqx-tabs-close-button {
	outline: none;
	background-image: url(images/close.png);
	cursor: pointer;
	margin: 0 0 0 0;
	padding: 0 0 0 0;
	position: relative;
	left: 5px;
}
/*applied to the tab close button when the tab is selected.*/
.jqx-tabs-close-button-selected {
	outline: none;
	background-image: url(images/close.png);
	cursor: pointer;
	margin: 0 0 0 0;
	padding: 0 0 0 0;
}
/*applied to the tab close button when the mouse is over the tab.*/
.jqx-tabs-close-button-hover {
	outline: none;
	background-image: url(images/close.png);
	cursor: pointer;
	margin: 0 0 0 0;
	padding: 0 0 0 0;
}
/*applied to the tab's left scroll arrow.*/
.jqx-tabs-arrow-left {
	outline: none;
	position: relative;
	z-index: 15;
	float: left;
	cursor: pointer;
	margin: 0 0 0 0;
	padding: 0 0 0 0;
	background-image: url('http://static.ole.vn/assets/css/jqx/images/tab-arrow-left.png');
	background-repeat: no-repeat;
	background-position: center;
}
/*applied to the tab's right scroll arrow.*/
.jqx-tabs-arrow-right {
	outline: none;
	position: relative;
	z-index: 15;
	background-image: url('http://static.ole.vn/assets/css/jqx/images/tab-arrow-right.png');
	background-repeat: no-repeat;
	background-position: center;
	float: left;
	cursor: pointer;
	margin: 0 0 0 0;
	padding: 0 0 0 0;
}
.jqx-tabs-arrow-background {
	background: #fff;
	width: 20px !important;
}
/*applied to the tab's title.*/
.jqx-tabs-title {
	outline: none;
	display: block;
	cursor: pointer;
	white-space: nowrap;
	left: 100%;
	right: 0;
	text-indent: 0px;
	list-style: none;
	border: none;
	margin: 0px;
	overflow: hidden;
	z-index: 1;
	padding: 5px 6px;
	background: transparent;
	height: auto;
	position: relative;
	opacity: 0.5;
}
.jqx-tabs-title a:link {
	color: inherit;
 *color: expression(this.parentNode.currentStyle['color']);
	text-decoration: none;
}
.jqx-tabs-title a:hover {
	color: inherit;
 *color: expression(this.parentNode.currentStyle['color']);
	text-decoration: none;
}
.jqx-tabs-title a:active {
	color: inherit;
 *color: expression(this.parentNode.currentStyle['color']);
	text-decoration: none;
}
.jqx-tabs-title a:visited {
	color: inherit;
 *color: expression(this.parentNode.currentStyle['color']);
	text-decoration: none;
}
/*applied to the tab's title when the tab is selected and the jqxTab's position property is set to 'top' .*/
.jqx-tabs-title-selected-top {
	z-index: 99;
	outline: none;
	border: none;
	background-color: #fff;
	padding-bottom: 7px;
	opacity: 1;
}
/*applied to the tab's title when the tab is selected and the jqxTab's position property is set to 'bottom' .*/
.jqx-tabs-title-selected-bottom {
	outline: none;
	border-top: 1px solid #fff;
	border-left: 1px solid transparent;
	border-right: 1px solid transparent;
	border-bottom: 1px solid transparent;
	padding-top: 7px;
	padding-bottom: 5px;
	margin-top: -2px;
	background-color: #fff;
}
/*applied to the tab's title when the tab is hovered and the jqxTab's position property is set to 'top' .*/
.jqx-tabs-title-hover-top {
	outline: none;
	border: none;
	padding-bottom: 5px;
	opacity: 1;
}
/*applied to the tab's title when the tab is hovered and the jqxTab's position property is set to 'bottom' .*/
.jqx-tabs-title-hover-bottom {
	outline: none;
	border: 1px solid transparent;
	padding-top: 5px;
}
/*applied to the tab's title when the tab is disabled.*/
/*applied to the tab's header.*/
.jqx-tabs-header {
	padding: 0px;
	margin: 0px;
	border: none;
	background: transparent;
}
/*applied to the tab's header when the position is bottom.*/
.jqx-tabs-header-bottom {
	padding-top: 1px;
	padding-bottom: 3px;
	border-top: 0px solid #aaa;
	border-left: 0px solid transparent;
	border-right: 0px solid transparent;
	border-bottom: 1px solid transparent;
}
/*applied to the tab's header when the tab is collapsed.*/
.jqx-tabs-header-collapsed {
	border: 1px solid #aaa;
}
/*applied to the tab's header when the position is bottom and tab is collapsed.*/
.jqx-tabs-header-collapsed-bottom {
	border: 1px solid #aaa;
}
.jqx-tabs-collapsed {
	border: 0px solid transparent;
}
.jqx-tabs-collapsed-bottom {
	border: 0px solid transparent;
}
/*applied to the tab's selection tracker container element.*/
.jqx-tabs-selection-tracker-container {
	outline: none;
	position: relative;
	text-indent: 0px;
	margin: 0 0 0 0;
	padding: 0 0 0 0;
	width: 100%;
	background: transparent;
	height: 0px;
}
/*applied to the tab's selection tracker when the jqxTab's position property is set to 'top'.*/
.jqx-tabs-selection-tracker-top {
	border-top: 1px solid transparent;
	border-left: 1px solid transparent;
	border-right: 1px solid transparent;
	padding-bottom: 2px;
	background-color: #fff;
	outline: none;
	position: absolute;
	z-index: 10;
}
/*applied to the tab's selection tracker when the jqxTab's position property is set to 'bottom'.*/
.jqx-tabs-selection-tracker-bottom {
	border-left: 1px solid transparent;
	border-right: 1px solid transparent;
	border-bottom: 1px solid transparent;
	background-color: #fff;
	outline: none;
	position: absolute;
	z-index: 10;
	margin-top: -1px;
	padding-bottom: 2px;
}
/*applied to the tab's content element which represents a DIV element.*/
.jqx-tabs-content {
	outline: none;
	border-bottom: 0px solid transparent;
	border-left: 0px solid transparent;
	border-right: 0px solid transparent;
	border-top: 0px solid transparent;
	text-align: left;
	clear: both;
	font-family: Arial;
	font-size: 12px;
}
.jqx-tabs-content-element {
	height: 100%;
	overflow: auto;
}
/*jqxCalendar Style*/
.jqx-calendar {
	border: 1px solid transparent;
	-webkit-appearance: none;
	overflow: hidden;
	outline: none;
	padding: 0px;
	margin: 0 0 0 0;
	cursor: default;
	border-collapse: separate;
}
.jqx-calendar td {
	padding-top: 0px;
	padding-bottom: 0px;
	border-collapse: separate;
	border-spacing: 0px;
	/*font-size: 13px;*/
	line-height: 1.231;
	height: 32px;
}
.jqx-calendar table {
	margin: 0px;
	padding: 0px;
	border-collapse: separate;
	border-spacing: 1px;
	/*font-size: 13px;*/
	line-height: 1.231;
}
/*applied to the calendar's row header. This header displays the week numbers.*/
.jqx-calendar-row-header {
	outline: none;
	border: 0px solid #f2f2f2;
	padding: 0;
	margin: 0 0 0 0;
	cursor: default;
}
/*applied to the calendar's column. This header displays the day names.*/
.jqx-calendar-column-header {
	outline: none;
	text-align: right;
	padding: 3px;
	border-top: none;
	border-bottom: 1px solid transparent;
	border-left: none;
	border-right: none;
	margin: 0 0 0 0;
	cursor: default;
	background-color: #C5C4BF;
	border-spacing: 1px !important;
	border-collapse: inherit !important;
}
.jqx-calendar-column-header td {
	background-color: #E8E5DE !important;
}
/*applied to the calendar's top-left header. This header is displayed before the day names and above the week numbers.*/
.jqx-calendar-top-left-header {
	outline: none;
	border: 0px solid #f2f2f2;
	margin: 0 0 0 0;
	cursor: default;
}
/*applied to the calendar's navigation buttons.*/
.jqx-calendar-title-navigation {
	cursor: pointer;
	background-color: transparent;
	margin: 0;
	padding: 0;
	border: none;
	width: 25px;
	height: 25px;
}
/*applied to the month table*/
.jqx-calendar-month {
	margin: 0;
	padding: 0;
	border: none;
	width: 100%;
}
/*applied to the calendar's title content.*/
.jqx-calendar-title-content {
	cursor: pointer;
	text-align: center;
	font-family: "Roboto Condensed";
	/*font-size: 16px;*/
	font-weight: 700;
	color: #3E454C;
}
/*applied to the calendar's navigation title.*/
.jqx-calendar-title-header {
	border-left: none;
	border-top: none;
	border-right: none;
	border-bottom-width: 1px;
	border-bottom-style: solid;
	margin: 0 0 0 0;
}
.jqx-calendar-title-header td {
	padding-left: 0px;
	padding-right: 0px;
	border: none;
}
/*applied to the calendar's navigation title when the calendar is disabled.*/
.jqx-calendar-title-header-disabled {
	border-bottom-width: 1px;
	border-bottom-style: solid;
	margin: 0 0 0 0;
	border-left: 0px solid transparent;
	border-right: 0px solid transparent;
	border-top: 0px solid transparent;
}
/*applied to a calendar cell.*/
.jqx-calendar-cell {
	margin: 0px;
	outline: none;
	text-align: center;
	padding: 1px;
	cursor: pointer;
	background-color: #fff;
}
.jqx-calendar-cell td {
	padding: 0;
	margin: 0;
}
/*applied to a calendar cell in decade and year views.*/
.jqx-calendar-cell-decade, .jqx-calendar-cell-year {
	text-align: center;
}
.jqx-calendar .jqx-fill-state-normal {
	background: transparent;
	border: 1px solid transparent;
}
/*applied to a calendar cell when the cell is hidden. A cell can be hidden when the showOtherMonthDays property is false and the calendar hides the cells with dates from the other months*/
.jqx-calendar-cell-hidden {
	margin: 0 0 0 0;
	visibility: hidden;
	cursor: default;
}
/*applied to a calendar cell when the cell's date is a weekend date.*/
.jqx-calendar-cell-weekend {
	color: red !important;
	margin: 0 0 0 0;
	cursor: pointer;
	font-weight: bold;
}
/*applied to a calendar cell when the cell's date is a special date(holiday, vacation, birthay. See the SpecialDates demo).*/
.jqx-calendar-cell-specialDate {
	color: #FF0000 !important;
	background-color: transparent;
	border: 1px solid #fff;
	margin: 0 0 0 0;
	cursor: pointer;
}
.jqx-calendar-cell-selected-invalid {
	color: #FFF !important;
	background: #FF0000 !important;
	border: 1px solid #FF0000 !important;
}
/*applied to a calendar cell when the cell's date is the today date.*/
.jqx-calendar-cell-today {
	color: #fff;
	background-color: #FF9000;
	margin: 0 0 0 0;
	cursor: pointer;
	font-weight: bold;
}
/*applied to a calendar cell when the cell is hovered.*/
.jqx-calendar-cell-hover {
	margin: 0 0 0 0;
	cursor: pointer;
	background-color: #FF9000;
	font-weight: bold;
	color: #fff !important;
}
/*applied to a calendar cell when the cell is selected.*/
.jqx-calendar-cell-selected {
	margin: 0 0 0 0;
	cursor: pointer;
}
/*applied to a calendar cell when the cell's date represents a date from the previous or next month.*/
.jqx-calendar-cell-othermonth {
	color: #898989 !important;
	background-color: #e7e7e7;
	margin: 0 0 0 0;
	cursor: pointer;
}
/*applied to a calendar cell when the calendar is disabled.*/
.jqx-calendar-cell-disabled {
	color: #ccc;
}
/*applied to a calendar cell when the cell is from the row header that displays the week numbers.*/
.jqx-calendar-row-cell {
	outline: none;
	text-align: center;
	border: 1px solid transparent;
	margin: 0 0 0 0;
	cursor: default;
}
/*applied to a calendar cell when the cell is from the row header that displays the week numbers and the calendar is disabled.*/
.jqx-calendar-footer {
	margin: 5px;
	color: inherit;/*font-size: 13px;*/
}
.jqx-calendar-title-container {
	overflow: hidden;
}
/*applied to a calendar cell when the cell is from the column header that displays the day names.*/
.jqx-calendar-column-cell {
	overflow: hidden;
	text-align: center;
	outline: none;
	font-weight: bold;
	margin: 0 0 0 0;
	cursor: default;
	background-color: transparent !important;
}
/*applied to a calendar cell when the cell is from the column header that displays the day names and the calendar is disabled.*/
/*applied to the calendar's cell area element.*/
.jqx-calendar-view {
	-webkit-appearance: none;
	outline: none;
	padding: 0px;
	border: 0px solid #fff;
	margin: 0 0 0 0;
	cursor: default;
}
.jqx-icon-arrow-left, .jqx-icon-arrow-left-hover, .jqx-icon-arrow-left-selected {
	background-image: url('http://static.ole.vn/assets/css/jqx/images/cal-arrow-left.png');
	background-repeat: no-repeat;
	background-position: center;
}
.jqx-icon-arrow-right, .jqx-icon-arrow-right-hover, .jqx-icon-arrow-right-selected {
	background-image: url('http://static.ole.vn/assets/css/jqx/images/cal-arrow-right.png');
	background-repeat: no-repeat;
	background-position: center;
}
#calendarContent table {
	background-color: #C5C4BF;
}	
/*--------------tab-content----------------------------------------*/
</style>
<script src="http://static.ole.vn/media/jui/js/jquery.min.js" type="text/javascript"></script>
<script src="http://static.ole.vn/assets/js/jquery.lazyload.min.js" type="text/javascript"></script>
<script src="http://static.ole.vn/assets/js/jqx/jqx.js" type="text/javascript"></script>
<script src="http://static.ole.vn/assets/js/jqx/jqxtabs.js" type="text/javascript"></script>
<script src="/_crawl/jquery.slimscroll.js" type="text/javascript"></script>
<script type="text/javascript">
	jQuery(document).ready(function(){
		var person = new Array();
		 person[0]="ANH"; person[1]="TBN"; person[2]="DUC"; person[3]="ITA"; person[4]="PHA"; person[5]="C1"; person[6]="C2"; person[7]="VQG";		jQuery('#slim-0').slimScroll({
			railVisible: true,
			railColor: '#333333',
			wheelStep : 2
		});
		jQuery('#m-league-table135').jqxTabs({
			width: '100%',
			position: 'top',
			scrollPosition: 'both',
			animationType: 'fade',
			scrollStep: 56
		});
		jQuery('#m-league-table135').on('tabclick', function (event) {
			var tabclicked = event.args.item;
			//console.log('The clicked tab is ' + tabclicked);
			callSlim(person, tabclicked);
			callSlim(person, tabclicked);
		});
	});
	function callSlim(person, tabclicked){
		for(var x in person){
			if(x==tabclicked){
				jQuery('#slim-'+x).slimScroll({
					railVisible: true,
					railColor: '#333333',
					wheelStep : 2
				});
				jQuery('#slim-'+x).css('display', 'block');
				jQuery('#slim-'+x).parent('.slimScrollDiv').css('display','block');
				console.log('s:'+x);
			}else{
				jQuery('#slim-'+x).css('display', 'none');
				jQuery('#slim-'+x).parent('.slimScrollDiv').css('display','none');
			}
		}
	}
</script>
</head>
<body>
<div class="container">
	<div class="orange-title">
		<h3 class="uk-panel-title"><span>Bảng Xếp Hạng</span></h3>
	</div>
	<div id="m-league-table135" class="m-league-table">
	<?
	if ($summary)
		echo $summary;
	?>
	</div>
</div>
</body>
</html>